package com.hjt.gulimall.order.config;

import com.hjt.gulimall.order.interceptor.UserLoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author:97007
 * @date:2021/10/9 17:29
 */
@Configuration
public class OrderWebMvcConfiguration implements WebMvcConfigurer {

    @Autowired
    private UserLoginInterceptor interceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(interceptor);
    }
}
